Skip to content

Test/add aidebugger tests#5939

Merged
omsuneri merged 2 commits intosugarlabs:masterfrom
kh-ub-ayb:test/add-aidebugger-tests
Feb 27, 2026
Merged

Test/add aidebugger tests#5939
omsuneri merged 2 commits intosugarlabs:masterfrom
kh-ub-ayb:test/add-aidebugger-tests

Conversation

@kh-ub-ayb
Copy link
Contributor

Summary

This pr adds a new unit test suite targeting the AIDebuggerWidget to test the constructor and vital data parsing/formatting helper methods.

Changes

  • Added 18 new unit tests in js/widgets/__tests__/aidebugger.test.js
  • No changes to source code

Test Coverage

Describe Block Tests Coverage
Constructor 2 Ensures the chat history, conversation ID logic, prompt counters, and initial properties correctly bootstrap without throwing. Maps _generateConversationId to verify unique identifier generation limits collisions.
Debugging Helper Methods 16 Extensively tests string and value parsing methods required by the LLM formatting system: _getNumericValue, _getTextValue, _getDrumName, _getNamedBoxValue, and _isBase64Data. Explicit tree/block traversal representation functions are covered in _getBlockRepresentation, ensuring blocks like loops, arithmetic, drums, and named variables stringify logically.

Scope

  • Only js/widgets/__tests__/aidebugger.test.js was added.

Verification

  • All 18 tests pass

@github-actions
Copy link
Contributor

✅ All Jest tests passed! This PR is ready to merge.

@kh-ub-ayb
Copy link
Contributor Author

@walterbender @omsuneri please review

@omsuneri omsuneri merged commit d373588 into sugarlabs:master Feb 27, 2026
7 checks passed
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants